---
title: Verify a contract
description: This guide will help you verify a smart contract on Taiko.
---

import { Aside } from "@astrojs/starlight/components";

This guide will help you verify a smart contract on Taiko.

## Prerequisites

You have a contract deployed on Taiko and the source code available.

## Taiko Alethia

---

### Verify a contract with Foundry

Replace the contract address and filepath to contract below, and then execute in terminal to verify your contract.

```bash
forge verify-contract 0x526317252e346978869d178081dA2cd10ac8b56D src/Counter.sol:Counter \
  --verifier-url https://blockscoutapi.mainnet.taiko.xyz/api\? \
  --verifier blockscout
```

It's also possible to verify the contract on Taikoscan through `Etherscan v2` API as follows:

```bash
forge verify-contract 0x526317252e346978869d178081dA2cd10ac8b56D src/Counter.sol:Counter \
  --chain 167000 \
  --verifier custom \
  --verifier-url https://api.etherscan.io/v2/api?chainid=167000&apikey={YOUR_API_KEY}
```

## Taiko Hoodi

---

### Verify a contract with Foundry

Replace the contract address and filepath to contract below, and then execute in terminal to verify your contract.

```bash
forge verify-contract 0x526317252e346978869d178081dA2cd10ac8b56D src/Counter.sol:Counter \
  --verifier-url https://blockscoutapi.hoodi.taiko.xyz/api\? \
  --verifier blockscout
```

<Aside>
For some users the above command does not work on Blockscout. You can also try passing a different `--verifier-url`:

```bash
--verifier-url https://blockscoutapi.hoodi.taiko.xyz/api?module=contract&action=verify
```

</Aside>

### Verify a contract with Hardhat or other alternatives

Check out the Blockscout docs [here](https://docs.blockscout.com/for-users/verifying-a-smart-contract) or Hardhat docs [here](https://hardhat.org/docs/guides/smart-contract-verification)!
